//
//  IndexCarModel.m
//  CarTown
//
//  Created by xionghao on 15/8/17.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "IndexCarModel.h"
#import "CarDetailmodel.h"
@implementation IndexCarModel
+(instancetype)indexcarWithDcit:(NSDictionary *)dict{
    IndexCarModel *index=[[IndexCarModel alloc]init];
    [index setValuesForKeysWithDictionary:dict];
    NSMutableArray *mdata=[NSMutableArray array];
    NSArray *dataarray=dict[@"data"];
    if (dataarray.count!=0) {
        for (NSDictionary *itemdict in dict[@"data"]) {
            CarDetailmodel *mode=[CarDetailmodel carWithdict:itemdict];
            [mdata addObject:mode];
        }
    }
    index.data=mdata;
    return index;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}
@end
